home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / bm / bm_fone2.geo / 00013.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  7.0 KB  |  318 lines

  1. on startMovie
  2.   sound stop 2
  3.   cursor([402, 403])
  4.   set the cursor of sprite 46 to [404, 405]
  5.   set the cursor of sprite 45 to [404, 405]
  6.   set the cursor of sprite 13 to [404, 405]
  7. end
  8.  
  9. on init
  10.   Set_SMLastSp(EMPTY)
  11.   Set_SMChosenSubMenu(Get_SelectedLine())
  12.   Set_SMMaxLines(10)
  13.   Set_SMSourceField(field ("LIST" & Get_SMChosenSubMenu() & "-" & Get_ScreenSubject()))
  14.   Set_SMFieldScroll(the number of cast "currScroll")
  15.   Set_SMNumOflines(the number of lines in Get_SMSourceField())
  16.   set the textHeight of field Get_SMFieldScroll() to 14
  17.   Set_SMSliderSprite(5)
  18.   Set_SMThumbSprite(6)
  19.   Set_SMCurrPlace(0)
  20.   Set_SMConstraintSprite(9)
  21.   Set_SMDisableSprite(13)
  22.   Set_SMHiliteSprite(15)
  23.   Set_SMSizeOfLine(14)
  24.   Set_SMTopField(the top of sprite 10)
  25.   Set_SMSelectedLine(EMPTY)
  26.   puppetSprite(Get_SMHiliteSprite(), 1)
  27.   puppetSprite(Get_SMThumbSprite(), 1)
  28.   set the immediate of sprite Get_SMThumbSprite() to 1
  29.   Set_SMSliderHeight(the height of sprite Get_SMConstraintSprite())
  30.   Set_SMOptions(Get_SMNumOfLines() - Get_SMMaxLines())
  31.   set the visible of sprite Get_SMDisableSprite() to not (Get_SMOptions() > 0)
  32.   if Get_SMOptions() > 0 then
  33.     Set_SMIncrement(1.0 * Get_SMSliderHeight() / Get_SMOptions())
  34.     set the cursor of sprite 13 to [404, 405]
  35.   else
  36.     set the cursor of sprite 13 to [400, 401]
  37.   end if
  38.   Set_SMTopLoc(the top of sprite Get_SMConstraintSprite())
  39.   repeat with i = 20 to 39
  40.     puppetSprite(i, 1)
  41.   end repeat
  42. end
  43.  
  44. on CancelLastSp
  45.   if Get_SMLastSP() <> EMPTY then
  46.     set the puppet of sprite Get_SMLastSP() to 0
  47.     updateStage()
  48.   end if
  49. end
  50.  
  51. on ChooseLine
  52.   set TopLoc to Get_SMTopField()
  53.   set VerticalLoc to getAt(the clickLoc, 2)
  54.   set NumOfline to (VerticalLoc - TopLoc) / Get_SMSizeOfLine()
  55.   if (NumOfline + 1) <= Get_SMNumOfLines() then
  56.     set newLoc to (NumOfline * Get_SMSizeOfLine()) + TopLoc
  57.     set the locV of sprite Get_SMHiliteSprite() to newLoc
  58.     Set_SMSelectedLine(Get_SMCurrPlace() + NumOfline + 1)
  59.   end if
  60. end
  61.  
  62. on UpdateHilight
  63.   if (Get_SMSelectedLine() <> EMPTY) and (Get_SMSelectedLine() > Get_SMCurrPlace()) and ((Get_SMSelectedLine() - 1) < (Get_SMCurrPlace() + Get_SMMaxLines())) then
  64.     set TopLoc to Get_SMTopField()
  65.     set newLoc to ((Get_SMSelectedLine() - Get_SMCurrPlace() - 1) * Get_SMSizeOfLine()) + TopLoc
  66.     set the locV of sprite Get_SMHiliteSprite() to newLoc
  67.   else
  68.     set the locV of sprite Get_SMHiliteSprite() to 999
  69.   end if
  70.   updateStage()
  71. end
  72.  
  73. on SliderActive
  74.   repeat while the stillDown
  75.     if rollOver(11) then
  76.       set newV to constrainV(Get_SMConstraintSprite(), mouseV())
  77.       set the locV of sprite Get_SMThumbSprite() to newV
  78.       set newValue to integer((newV - Get_SMTopLoc()) / Get_SMIncrement())
  79.       Set_SMCurrPlace(newValue)
  80.       UpdateHilight()
  81.       put line Get_SMCurrPlace() + 1 to Get_SMCurrPlace() + Get_SMMaxLines() of Get_SMSourceField() into field Get_SMFieldScroll()
  82.     end if
  83.   end repeat
  84. end
  85.  
  86. on PlaceMySlider
  87.   set currentValue to Get_SMCurrPlace()
  88.   if Get_SMOptions() > 0 then
  89.     set newPlace to Get_SMTopLoc() + integer(Get_SMIncrement() * currentValue)
  90.   end if
  91.   UpdateHilight()
  92.   put line Get_SMCurrPlace() + 1 to Get_SMCurrPlace() + Get_SMMaxLines() of Get_SMSourceField() into field Get_SMFieldScroll()
  93. end
  94.  
  95. on PlaceSlider
  96.   set currentValue to Get_SMCurrPlace()
  97.   if Get_SMOptions() > 0 then
  98.     set newPlace to Get_SMTopLoc() + integer(Get_SMIncrement() * currentValue)
  99.     set the locV of sprite Get_SMThumbSprite() to constrainV(Get_SMConstraintSprite(), newPlace)
  100.     updateStage()
  101.   end if
  102.   UpdateHilight()
  103.   put line Get_SMCurrPlace() + 1 to Get_SMCurrPlace() + Get_SMMaxLines() of Get_SMSourceField() into field Get_SMFieldScroll()
  104. end
  105.  
  106. on ClickSlider toSub
  107.   if not toSub then
  108.     Set_SMCurrPlace(Get_SMCurrPlace() - Get_SMMaxLines() + 1)
  109.   else
  110.     Set_SMCurrPlace(Get_SMCurrPlace() + Get_SMMaxLines() - 1)
  111.   end if
  112.   if Get_SMCurrPlace() < 0 then
  113.     Set_SMCurrPlace(0)
  114.   else
  115.     if (Get_SMCurrPlace() + Get_SMMaxLines()) > Get_SMNumOfLines() then
  116.       Set_SMCurrPlace(Get_SMNumOfLines() - Get_SMMaxLines())
  117.     end if
  118.   end if
  119.   PlaceSlider()
  120. end
  121.  
  122. on Set_SMStepMeter direction
  123.   set currentValue to Get_SMCurrPlace()
  124.   if (direction = "increase") and (currentValue <> Get_SMOptions()) then
  125.     Set_SMCurrPlace(currentValue + 1)
  126.   else
  127.     if (direction = "decrease") and (currentValue <> 0) then
  128.       Set_SMCurrPlace(currentValue - 1)
  129.     end if
  130.   end if
  131.   PlaceSlider()
  132. end
  133.  
  134. on Set_SMSliderSprite int
  135.   global SMSliderSprite
  136.   set SMSliderSprite to int
  137. end
  138.  
  139. on Get_SMSliderSprite
  140.   global SMSliderSprite
  141.   return SMSliderSprite
  142. end
  143.  
  144. on Set_SMThumbSprite int
  145.   global SMThumbSprite
  146.   set SMThumbSprite to int
  147. end
  148.  
  149. on Get_SMThumbSprite
  150.   global SMThumbSprite
  151.   return SMThumbSprite
  152. end
  153.  
  154. on Set_SMCurrPlace int
  155.   global SMCurrPlace
  156.   set SMCurrPlace to int
  157. end
  158.  
  159. on Get_SMCurrPlace
  160.   global SMCurrPlace
  161.   return SMCurrPlace
  162. end
  163.  
  164. on Set_SMSliderHeight int
  165.   global SMSliderHeight
  166.   set SMSliderHeight to int
  167. end
  168.  
  169. on Get_SMSliderHeight
  170.   global SMSliderHeight
  171.   return SMSliderHeight
  172. end
  173.  
  174. on Set_SMIncrement int
  175.   global SMIncrement
  176.   set SMIncrement to int
  177. end
  178.  
  179. on Get_SMIncrement
  180.   global SMIncrement
  181.   return SMIncrement
  182. end
  183.  
  184. on Set_SMTopLoc int
  185.   global SMTopLoc
  186.   set SMTopLoc to int
  187. end
  188.  
  189. on Get_SMTopLoc
  190.   global SMTopLoc
  191.   return SMTopLoc
  192. end
  193.  
  194. on Set_SMOptions int
  195.   global SMOptions
  196.   set SMOptions to int
  197. end
  198.  
  199. on Get_SMOptions
  200.   global SMOptions
  201.   return SMOptions
  202. end
  203.  
  204. on Set_SMMaxLines int
  205.   global SMMaxLines
  206.   set SMMaxLines to int
  207. end
  208.  
  209. on Get_SMMaxLines
  210.   global SMMaxLines
  211.   return SMMaxLines
  212. end
  213.  
  214. on Set_SMSourceField str
  215.   global SMSourceField
  216.   set SMSourceField to str
  217. end
  218.  
  219. on Get_SMSourceField
  220.   global SMSourceField
  221.   return SMSourceField
  222. end
  223.  
  224. on Set_SMFieldScroll int
  225.   global SMFieldScroll
  226.   set SMFieldScroll to int
  227. end
  228.  
  229. on Get_SMFieldScroll
  230.   global SMFieldScroll
  231.   return SMFieldScroll
  232. end
  233.  
  234. on Set_SMNumOflines int
  235.   global SMNumOflines
  236.   set SMNumOflines to int
  237. end
  238.  
  239. on Get_SMNumOfLines
  240.   global SMNumOflines
  241.   return SMNumOflines
  242. end
  243.  
  244. on Set_SMConstraintSprite int
  245.   global SMConstraintSprite
  246.   set SMConstraintSprite to int
  247. end
  248.  
  249. on Get_SMConstraintSprite
  250.   global SMConstraintSprite
  251.   return SMConstraintSprite
  252. end
  253.  
  254. on Set_SMDisableSprite int
  255.   global SMDisableSprite
  256.   set SMDisableSprite to int
  257. end
  258.  
  259. on Get_SMDisableSprite
  260.   global SMDisableSprite
  261.   return SMDisableSprite
  262. end
  263.  
  264. on Set_SMHiliteSprite int
  265.   global SMHiliteSprite
  266.   set SMHiliteSprite to int
  267. end
  268.  
  269. on Get_SMHiliteSprite
  270.   global SMHiliteSprite
  271.   return SMHiliteSprite
  272. end
  273.  
  274. on Set_SMSizeOfLine int
  275.   global SMSizeOfLine
  276.   set SMSizeOfLine to int
  277. end
  278.  
  279. on Get_SMSizeOfLine
  280.   global SMSizeOfLine
  281.   return SMSizeOfLine
  282. end
  283.  
  284. on Set_SMSelectedLine int
  285.   global SMSelectedLine
  286.   set SMSelectedLine to int
  287. end
  288.  
  289. on Get_SMSelectedLine
  290.   global SMSelectedLine
  291.   return SMSelectedLine
  292. end
  293.  
  294. on Get_SelectedLine
  295.   global SelectedLine
  296.   return SelectedLine
  297. end
  298.  
  299. on Set_SMTopField int
  300.   global SMTopField
  301.   set SMTopField to int
  302. end
  303.  
  304. on Get_SMTopField
  305.   global SMTopField
  306.   return SMTopField
  307. end
  308.  
  309. on Set_SMChosenSubMenu int
  310.   global SMChosenSubMenu
  311.   set SMChosenSubMenu to int
  312. end
  313.  
  314. on Get_SMChosenSubMenu
  315.   global SMChosenSubMenu
  316.   return SMChosenSubMenu
  317. end
  318.